package sw6.launcher;

import android.app.ListActivity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.ListView;
import android.widget.Toast;

public class ApplicationsSSIDActivity extends ListActivity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		setListAdapter(new ApplicationsSSIDAdapter(this));		
		
		
		
		super.onCreate(savedInstanceState);
	}
	
	@Override
	protected void onListItemClick(ListView l, View v, int position, long id) {
		
		Intent intent = new Intent(this,SSIDBlack.class);
		intent.setData((Uri) getListAdapter().getItem(position));
		
		try{
			startActivity(intent);
		}catch(ActivityNotFoundException e) {
			Toast.makeText(this, "The activity that should edit the SSID blocking for this app does not exist.", Toast.LENGTH_LONG).show();
		}
		
		super.onListItemClick(l, v, position, id);
	}
}
